-- 
function foo(s)
  print("foo:", s);
  return coroutine.yield(2 * s);
end

local _co_1 = coroutine.create(
  function(x, y)
    print("1:", x, y);

    local _x, _y = foo(x + 1);
    print("2:", _x, _y)

    local _x, _y = coroutine.yield(5, 6)
    print("3:", _x, _y)

    return "Hello World!"
  end
);

print("main:", coroutine.resume(_co_1, 1, 2));
print("----- -----")
print("main:", coroutine.resume(_co_1, 3, 4));
print("----- -----")

local _ok, _val = coroutine.resume(_co_1, "h", "x");
print("main:", _ok, _val);
print("----- -----")
